package com.example.vote.springboot_vote;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface UserJpaRepository  extends JpaRepository<UserJpa, Long> {
    UserJpa findByName(String name);

    UserJpa findByNameAndAge(String name, Integer age);

    @Query("from UserJpa u where u.name=:name")
    UserJpa findUser(@Param("name") String name);
}
